package com.baitiaojun.user.feign;

import com.baitiaojun.api.domain.auth.UserRole;
import com.baitiaojun.api.exception.ConditionException;
import com.baitiaojun.api.vo.JsonRes;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * @类名 UserAuthoritiesFeign
 * @描述 TODO
 * @作者 白条君
 * @创建日期 2022/12/8 00:31
 * @版本 1.0
 */
@FeignClient(name = "imooc-bilibili-auth", path = "/auth")
public interface UserAuthoritiesFeign {

    @GetMapping("/search-role-code")
    JsonRes getRoleCode(@RequestParam("userId") Long userId);

    @PostMapping("/new-default-role")
    JsonRes addDefaultRole(@RequestParam("userId") Long userId) throws ConditionException;
}